package com.syh.jn.scm.domain.supplier.event;

import com.syh.core.ddd.domain.DomainEvent;
import com.syh.jn.scm.domain.supplier.entity.finance.IncomeBill;

/**
 * 服务商收入单事件
 */
public class IncomeBillEvent extends DomainEvent<IncomeBill> {
  public static final String INCOME_BILL_CREATE = "incomeBillCreate";
  public static final String INCOME_BILL_DESTROY = "incomeBillDestroy";
  public static final String INCOME_BILL_STATE_CONFIRM = "incomeBillStateConfirm";
  public static final String INCOME_BILL_STATE_UN_CONFIRM = "incomeBillStateUnConfirm";

  /**
   * 收入单创建事件
   *
   * @param values
   * @return
   */
  public static IncomeBillEvent buildCreate(Object[] values) {
    IncomeBillEvent incomeBillEvent = new IncomeBillEvent();
    incomeBillEvent.eventName = INCOME_BILL_CREATE;
    incomeBillEvent.values = values;
    return incomeBillEvent;
  }

  /**
   * 收入单销毁事件
   *
   * @param values
   * @return
   */
  public static IncomeBillEvent buildDestroy(Object[] values) {
    IncomeBillEvent incomeBillEvent = new IncomeBillEvent();
    incomeBillEvent.eventName = INCOME_BILL_DESTROY;
    incomeBillEvent.values = values;
    return incomeBillEvent;
  }


  /**
   * 收入单确认
   *
   * @param values
   * @return
   */
  public static IncomeBillEvent buildStateConfirm(Object[] values) {
    IncomeBillEvent incomeBillEvent = new IncomeBillEvent();
    incomeBillEvent.eventName = INCOME_BILL_STATE_CONFIRM;
    incomeBillEvent.values = values;
    return incomeBillEvent;
  }

  /**
   * 收入单取消
   *
   * @param values
   * @return
   */
  public static IncomeBillEvent buildStateUnConfirm(Object[] values) {
    IncomeBillEvent incomeBillEvent = new IncomeBillEvent();
    incomeBillEvent.eventName = INCOME_BILL_STATE_UN_CONFIRM;
    incomeBillEvent.values = values;
    return incomeBillEvent;
  }
}
